﻿using System;
using System.ComponentModel.DataAnnotations;
using WalkingTec.Mvvm.Core;
using System.Collections.Generic;
using AssetManageSystem.Model.OrgManage;

namespace AssetManageSystem.Model.AssetManage
{
    /// <summary>
    /// 资产调拨
    /// </summary>
    public class AssetAllocation : PersistPoco
    {
        [Display(Name = "单据编号")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public string DocNumber { get; set; }

        [Display(Name = "原使用人")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public Guid? OldUserId { get; set; }
        public User OldUser { get; set; }

        [Display(Name = "原使用部门")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public Guid? OldDepId { get; set; }
        public Department OldDep { get; set; }

        [Display(Name = "现使用人")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public Guid? NewUserId { get; set; }
        public User NewUser { get; set; }

        [Display(Name = "现使用部门")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public Guid? NewDepId { get; set; }
        public Department NewDep { get; set; }

        [Display(Name = "调拨日期")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public DateTime? OutDate { get; set; }

        [Display(Name = "资产ID")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public Guid? AssetId { get; set; }
        public AssetInfo Asset { get; set; }

        public List<AssetInfo> AssetInfos { get; set; }


    }
}
